//
//  ILPlayAudio.h
//
// All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AVFoundation/AVFoundation.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AudioToolbox/AudioFile.h>

#define NUM_BUFFERS 3

@interface ILPlayAudio : NSObject

//定义队列为实例属性
@property AudioQueueRef queue;
//启动循环等待
- (int)start;
//定义缓存数据读取方法
//- (void)audioQueueOutputWithQueue:(AudioQueueRef)audioQueue
//                      queueBuffer:(AudioQueueBufferRef)audioQueueBuffer;
//- (UInt32)readPacketsIntoBuffer:(AudioQueueBufferRef)buffer;
//添加数据
- (void)addAudioBuffer:(NSData *)bufferdata;
//- (void)startPlay:(NSInteger)sampleRate withChannel:(NSInteger)audioChannel;
- (void)stopPlay;
- (void)flushAudio;
- (void)reset;
- (void)setGain:(Float32)gain;

@end
